package com.ljf.config.dto.command;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.ljf.common.validation.AddGroup;
import com.ljf.common.validation.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 记录标签配置--新增修改  config_dat_record_symbol
 *
 * @author LJF
 * @since 2025-01-31
 */
@Data
@ApiModel("记录标签配置--新增修改")
public class ConfigDatRecordSymbolCommand implements Serializable {

    @JsonProperty("id")
    @ApiModelProperty(value = "ID")
    @NotNull(message = "ID不能为空", groups = UpdateGroup.class)
    private Long id;

    @JsonProperty("name")
    @ApiModelProperty(value = "名称")
    @NotEmpty(message = "名称不能为空")
    @Length(message = "名称不能超过20个字符", max = 20)
    private String name;

    @JsonProperty("type")
    @ApiModelProperty(value = "类型")
    @NotNull(message = "类型不能为空", groups = AddGroup.class)
    private Integer type;

}
